3.5 \(\int \frac {(d+i c d x) (a+b \tan ^{-1}(c x))}{x} \, dx\)

Optimal. Leaf size=76 \[ i a c d x+a d \log (x)-\frac {1}{2} i b d \log \left (c^2 x^2+1\right )+\frac {1}{2} i b d \text {Li}_2(-i c x)-\frac {1}{2} i b d \text {Li}_2(i c x)+i b c d x \tan ^{-1}(c x) \]

[Out]

I*a*c*d*x+I*b*c*d*x*arctan(c*x)+a*d*ln(x)-1/2*I*b*d*ln(c^2*x^2+1)+1/2*I*b*d*polylog(2,-I*c*x)-1/2*I*b*d*polylo
g(2,I*c*x)

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {4876, 4846, 260, 4848, 2391} \[ \frac {1}{2} i b d \text {PolyLog}(2,-i c x)-\frac {1}{2} i b d \text {PolyLog}(2,i c x)+i a c d x+a d \log (x)-\frac {1}{2} i b d \log \left (c^2 x^2+1\right )+i b c d x \tan ^{-1}(c x) \]

Antiderivative was successfully verified.

[In]

Int[((d + I*c*d*x)*(a + b*ArcTan[c*x]))/x,x]

[Out]

I*a*c*d*x + I*b*c*d*x*ArcTan[c*x] + a*d*Log[x] - (I/2)*b*d*Log[1 + c^2*x^2] + (I/2)*b*d*PolyLog[2, (-I)*c*x] -
 (I/2)*b*d*PolyLog[2, I*c*x]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4846

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTan[c*x])^p, x] - Dist[b*c*p, Int[
(x*(a + b*ArcTan[c*x])^(p - 1))/(1 + c^2*x^2), x], x] /; FreeQ[{a, b, c}, x] && IGtQ[p, 0]

Rule 4848

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[(I*b)/2, Int[Log[1 - I*c*x
]/x, x], x] - Dist[(I*b)/2, Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 4876

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Int[Ex
pandIntegrand[(a + b*ArcTan[c*x])^p, (f*x)^m*(d + e*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[p,
 0] && IntegerQ[q] && (GtQ[q, 0] || NeQ[a, 0] || IntegerQ[m])

Rubi steps

\begin {align*} \int \frac {(d+i c d x) \left (a+b \tan ^{-1}(c x)\right )}{x} \, dx &=\int \left (i c d \left (a+b \tan ^{-1}(c x)\right )+\frac {d \left (a+b \tan ^{-1}(c x)\right )}{x}\right ) \, dx\\ &=d \int \frac {a+b \tan ^{-1}(c x)}{x} \, dx+(i c d) \int \left (a+b \tan ^{-1}(c x)\right ) \, dx\\ &=i a c d x+a d \log (x)+\frac {1}{2} (i b d) \int \frac {\log (1-i c x)}{x} \, dx-\frac {1}{2} (i b d) \int \frac {\log (1+i c x)}{x} \, dx+(i b c d) \int \tan ^{-1}(c x) \, dx\\ &=i a c d x+i b c d x \tan ^{-1}(c x)+a d \log (x)+\frac {1}{2} i b d \text {Li}_2(-i c x)-\frac {1}{2} i b d \text {Li}_2(i c x)-\left (i b c^2 d\right ) \int \frac {x}{1+c^2 x^2} \, dx\\ &=i a c d x+i b c d x \tan ^{-1}(c x)+a d \log (x)-\frac {1}{2} i b d \log \left (1+c^2 x^2\right )+\frac {1}{2} i b d \text {Li}_2(-i c x)-\frac {1}{2} i b d \text {Li}_2(i c x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 76, normalized size = 1.00 \[ i a c d x+a d \log (x)-\frac {1}{2} i b d \log \left (c^2 x^2+1\right )+\frac {1}{2} i b d \text {Li}_2(-i c x)-\frac {1}{2} i b d \text {Li}_2(i c x)+i b c d x \tan ^{-1}(c x) \]

Antiderivative was successfully verified.

[In]

Integrate[((d + I*c*d*x)*(a + b*ArcTan[c*x]))/x,x]

[Out]

I*a*c*d*x + I*b*c*d*x*ArcTan[c*x] + a*d*Log[x] - (I/2)*b*d*Log[1 + c^2*x^2] + (I/2)*b*d*PolyLog[2, (-I)*c*x] -
 (I/2)*b*d*PolyLog[2, I*c*x]

________________________________________________________________________________________

fricas [F]  time = 0.47, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {2 i \, a c d x + 2 \, a d - {\left (b c d x - i \, b d\right )} \log \left (-\frac {c x + i}{c x - i}\right )}{2 \, x}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)*(a+b*arctan(c*x))/x,x, algorithm="fricas")

[Out]

integral(1/2*(2*I*a*c*d*x + 2*a*d - (b*c*d*x - I*b*d)*log(-(c*x + I)/(c*x - I)))/x, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \mathit {sage}_{0} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)*(a+b*arctan(c*x))/x,x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

maple [A]  time = 0.05, size = 113, normalized size = 1.49 \[ i a c d x +d a \ln \left (c x \right )+i b c d x \arctan \left (c x \right )+d b \ln \left (c x \right ) \arctan \left (c x \right )+\frac {i d b \ln \left (c x \right ) \ln \left (i c x +1\right )}{2}-\frac {i d b \ln \left (c x \right ) \ln \left (-i c x +1\right )}{2}+\frac {i d b \dilog \left (i c x +1\right )}{2}-\frac {i d b \dilog \left (-i c x +1\right )}{2}-\frac {i b d \ln \left (c^{2} x^{2}+1\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d+I*c*d*x)*(a+b*arctan(c*x))/x,x)

[Out]

I*a*c*d*x+d*a*ln(c*x)+I*b*c*d*x*arctan(c*x)+d*b*ln(c*x)*arctan(c*x)+1/2*I*d*b*ln(c*x)*ln(1+I*c*x)-1/2*I*d*b*ln
(c*x)*ln(1-I*c*x)+1/2*I*d*b*dilog(1+I*c*x)-1/2*I*d*b*dilog(1-I*c*x)-1/2*I*b*d*ln(c^2*x^2+1)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ i \, a c d x + \frac {1}{2} i \, {\left (2 \, c x \arctan \left (c x\right ) - \log \left (c^{2} x^{2} + 1\right )\right )} b d + b d \int \frac {\arctan \left (c x\right )}{x}\,{d x} + a d \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)*(a+b*arctan(c*x))/x,x, algorithm="maxima")

[Out]

I*a*c*d*x + 1/2*I*(2*c*x*arctan(c*x) - log(c^2*x^2 + 1))*b*d + b*d*integrate(arctan(c*x)/x, x) + a*d*log(x)

________________________________________________________________________________________

mupad [B]  time = 0.62, size = 63, normalized size = 0.83 \[ -\frac {b\,d\,\left (\ln \left (c^2\,x^2+1\right )\,1{}\mathrm {i}-c\,x\,\mathrm {atan}\left (c\,x\right )\,2{}\mathrm {i}\right )}{2}+a\,d\,\left (\ln \relax (x)+c\,x\,1{}\mathrm {i}\right )-\frac {b\,d\,\left ({\mathrm {Li}}_{\mathrm {2}}\left (1-c\,x\,1{}\mathrm {i}\right )-{\mathrm {Li}}_{\mathrm {2}}\left (1+c\,x\,1{}\mathrm {i}\right )\right )\,1{}\mathrm {i}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*atan(c*x))*(d + c*d*x*1i))/x,x)

[Out]

a*d*(log(x) + c*x*1i) - (b*d*(log(c^2*x^2 + 1)*1i - c*x*atan(c*x)*2i))/2 - (b*d*(dilog(1 - c*x*1i) - dilog(c*x
*1i + 1))*1i)/2

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ i d \left (\int a c\, dx + \int \left (- \frac {i a}{x}\right )\, dx + \int b c \operatorname {atan}{\left (c x \right )}\, dx + \int \left (- \frac {i b \operatorname {atan}{\left (c x \right )}}{x}\right )\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)*(a+b*atan(c*x))/x,x)

[Out]

I*d*(Integral(a*c, x) + Integral(-I*a/x, x) + Integral(b*c*atan(c*x), x) + Integral(-I*b*atan(c*x)/x, x))

________________________________________________________________________________________